// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
// import Vue from 'vue'
import App from './App'
import router from './router'
import './util/index' // 全局工具类 $util
import './util/Http' // 全局网络请求 $http
import './util/Substring' // 全局抹0
// import ElementUI from 'element-ui' // 引入element
import 'element-ui/lib/theme-chalk/index.css'
import vuescroll from 'vuescroll' // 引入vuescroll美化
import 'vuescroll/dist/vuescroll.css'
import './config' //全局的配置
// import echarts from 'echarts'
import '../static/scss/element-custom.scss'
import store from './store/index'
import hasPermission from './directives/hasPermission'
Vue.prototype.$echarts = echarts
Vue.config.productionTip = false
// Vue.use(ElementUI)
Vue.use(vuescroll)
Vue.prototype.$vuescrollConfig = {
  bar: {
    background: '#DDDEE0',
    onlyShowBarOnScroll: false,
  }
}
// 导入一个全局验证方法
import { inputRule, selectRule } from "@/util/Rule";
Vue.prototype.$inputRule = inputRule;
Vue.prototype.$selectRule = selectRule;

// Sentry错误日志捕获
import * as Sentry from '@sentry/browser';
import * as Integrations from '@sentry/integrations';
if (process.env.NODE_ENV === 'production') {
  Sentry.init({
    dsn: 'https://99fc1e3b1e3141609e8f348e43e35689@sentry.io/1484441',
    integrations: [new Integrations.Vue({Vue, attachProps: true})],
  });
}

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
